//
//  WebViewController.m
//  ShouYi
//
//  Created by yrapp on 16/2/24.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "WebViewController.h"

@interface WebViewController ()
@property(nonatomic,strong)UIWebView *webView;
@end

@implementation WebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addWebView];
    
    self.title = self.textTitle;
    
    
    
    
    [self addUrl:self.webUrl];
    
    // Do any additional setup after loading the view.
}


//添加webView
- (void)addWebView {
    
    self.webView = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    [self.view addSubview:self.webView];
    
}

//加载内容
- (void)addUrl:(NSString *)url {
    
    NSURL *tempUrl = [NSURL URLWithString:url];
    NSURLRequest *request = [NSURLRequest requestWithURL:tempUrl];
    [self.webView loadRequest:request];
   
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
